package com.utils.failureanalysis.data.util;

import org.springframework.data.domain.Sort;

import java.util.ArrayList;
import java.util.List;

public class SortTool {
//    将DESC换成ASC则表示升序
    public static Sort defaultSort(){
        List<Sort.Order> orders=new ArrayList<>();
        orders.add(new Sort.Order(Sort.Direction.DESC,"taskId"));
        orders.add(new Sort.Order(Sort.Direction.ASC,"moduleName"));
        orders.add(new Sort.Order(Sort.Direction.ASC,"caseName"));
        return new Sort(orders);
    }
}
